#!/bin/bash
###############case6################
case6_1_expect="successfully"
check_results_case6_1=`./register.sh fbbreg.jpg fanbinbin`
if [[ $check_results_case6_1 == *${case6_1_expect}* ]]
then
    echo "case6 one face regist success "
else
    echo "case6 one face regist fail"
fi

###############case7################
case7_1_expect="successfully"
check_results_case7_1=`./run.sh ldhrecoc.jpg`
if [[ $check_results_case7_1 == *${case7_1_expect}* ]]
then
    echo "case7 face recognise success "
else
    echo "case7 face recognise fail"
fi


case7_2_expect="registered."
check_results_case7_2=`./show.sh`
if [[ $check_results_case7_2 == *$case7_2_expect* ]] 
then 
    echo "case7 show datebase face success "
else 
    echo "case7 show datebase face fail"
 fi

case7_3_expect="successfully"
check_results_case7_3=`./register.sh fbbreg.jpg fanbinbin`
if [[ $check_results_case7_3 == *${case7_3_expect}* ]]
then
    echo "case7 one face regist success "
else
    echo "case7 one face regist fail"
fi 


case7_4_expect="user name: fbb clear done."
check_results_case7_4=`./clear.sh fbb`
if [[ $check_results_case7_4 == *${case7_4_expect}* ]]
then
    echo "case7 one face clear success "
else
    echo "case7 one face clear fail"
fi

###############case8################
case8_1_expect="successfully"
check_results_case8_1=`./show.sh ldh`
if [[ $check_results_case8_1 == *${case8_1_expect}* ]]
then
    echo "case8 database show successfully "
else
    echo "case8 database show fail"
fi



###############case9################
case9_1_expect="clear done."
check_results_case9_1=`./clear.sh ldh`
if [[ $check_results_case9_1 == *${case9_1_expect}* ]]
then
    echo "case9_1 ldh face clear success "
else
    echo "case9_1 ldh face clear fail"
fi 


case9_2_expect="wangj not register in database"
check_results_case9_2=`./clear.sh wangj`
if [[ $check_results_case9_2 == *${case9_2_expect}* ]]
then
    echo "case9_2 wangj not register in database "
else
    echo "case9_2 clear not exist face tips fail"
fi 


case9_3_expect="database clear done."
check_results_case9_3=`./clear.sh`
if [[ $check_results_case9_3 == *${case9_3_expect}* ]]
then
    echo "case9_3 database clear success "
else
    echo "case9_3 database clear fail"
fi 


###############case10################
case10_1_expect="Face Feature Value"
check_results_case10_1=`./show.sh ldh`
if [[ $check_results_case10_1 == *${case10_1_expect}* ]]
then
    echo "case10_1 prinnt Face Feature Value success "
else
    echo "case10_1 prinnt Face Feature Value fail"
fi

 
